//
//  JourneyDetailTableViewCell.m
//  WildDonkey
//
//  Created by 孙俊 on 15/3/31.
//  Copyright (c) 2015年 lanou. All rights reserved.
//

#import "JourneyDetailTableViewCell.h"

@interface JourneyDetailTableViewCell()

@property (nonatomic,retain) UIWebView *webView;

@end

@implementation JourneyDetailTableViewCell

- (void)dealloc
{
	[_content release];
	[_webView release];
	[super dealloc];
}

- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
	self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
	if (self) {
		
		self.webView = [[UIWebView alloc] initWithFrame:[UIScreen mainScreen].bounds];
		
		[_webView loadHTMLString:_content baseURL:nil];
		
		[_webView release];
		_webView = nil;
		
	}
	return self;
}

- (void)setData:(JourneyDetailData *)data
{
	if (_data != data) {
		[_data release];
		_data = [data retain];
		
		_content = data.content;
		
	}
}

@end
